import { createRouter, createWebHistory } from "vue-router";
import HomeView from "../views/HomeView.vue";

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: "/",
      redirect: "/home",
    },
    {
      path: "/tab",
      name: "tab",
      component: () => import("../views/TabView.vue"),
      children: [
        {
          path: "/home",
          name: "home",
          component: HomeView,
        },
        {
          path: "/myke",
          name: "myke",
          component: () => import("../views/MykeView.vue"),
        },
        {
          path: "/my",
          name: "my",
          component: () => import("../views/MyView.vue"),
        },
      ],
    },
    {
      path: "/search",
      name: "search",
      component: () => import("../views/SearchView.vue"),
    },
    {
      path: "/mfke",
      name: "mfke",
      component: () => import("../views/MfkeView.vue"),
    },
    {
      path: "/goods/:id",
      name: "goods",
      component: () => import("../views/GoodsView.vue"),
    },
    {
      path: "/login",
      name: "login",
      component: () => import("../views/LoginView.vue"),
    },
    {
      path: "/zhuce",
      name: "zhuce",
      component: () => import("../views/ZhuceView.vue"),
    },
    {
      path: "/wmima",
      name: "wmima",
      component: () => import("../views/WmimaView.vue"),
    },
    {
      path: "/smima",
      name: "smima",
      component: () => import("../views/SmimaView.vue"),
    },
    {
      path: "/geren",
      name: "geren",
      component: () => import("../views/GerenView.vue"),
    },
    {
      path: "/shezhi",
      name: "shezhi",
      component: () => import("../views/ShezhiView.vue"),
    },
    {
      path: "/shoucang",
      name: "shoucang",
      component: () => import("../views/ShoucangView.vue"),
    },
    {
      path: "/mingshi",
      name: "mingshi",
      component: () => import("../views/MingshiView.vue"),
    },
    {
      path: "/huiyuan",
      name: "Huiyuan",
      component: () => import("../views/HuiyuanView.vue"),
    },
    {
      path: "/moeny",
      name: "Moeny",
      component: () => import("../views/MoenyView.vue"),
    },
    {
      path: "/xxjl",
      name: "xxjl",
      component: () => import("../views/XxjlView.vue"),
    },
    {
      path: "/xxzl",
      name: "xxzl",
      component: () => import("../views/XxzlView.vue"),
    },
    {
      path: "/dingdan",
      name: "dingdan",
      component: () => import("../views/MydingdanView.vue"),
    },
    {
      path: "/duihuan",
      name: "duihuan",
      component: () => import("../views/DuihuanView.vue"),
    },
    {
      path: "/address",
      name: "address",
      component: () => import("../views/AddressView.vue"),
    },
    {
      path: "/xiaoxi",
      name: "xiaoxi",
      component: () => import("../views/XiaoxiView.vue"),
    },
    {
      path: "/wenti",
      name: "wenti",
      component: () => import("../views/WentiView.vue"),
    },
    {
      path: "/addaddress",
      name: "addaddress",
      component: () => import("../views/addaddressView.vue"),
    },
    {
      path: "/sex",
      name: "sex",
      component: () => import("../views/SexView.vue"),
    },
    {
      path: "/baokao",
      name: "baokao",
      component: () => import("../views/BaokaoView.vue"),
    },
    {
      path: "/info",
      name: "info",
      component: () => import("../views/InfoView.vue"),
    },
    {
      path: "/mai",
      name: "mai",
      component: () => import("../views/MaiView.vue"),
    },
  ],
});

export default router;
